package com.iplant.mes.service;


import com.iplant.base.po.ServiceResult;
import com.iplant.basic.service.bpm.BPMTaskService;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.mes.service.po.exc.EXCLineStop;
import com.iplant.mes.service.po.exc.EXCProductRepair;
import com.iplant.mes.service.po.exc.EXCStatRate;
import com.iplant.mes.service.po.exc.EXCUnusualTask;
import com.iplant.mes.service.po.sfc.SFCTaskIPT;
import com.iplant.mes.service.po.sfc.SFCWorkpieceRecord;
import com.iplant.pdm.service.po.bop.FPCRoutePartPoint;

import java.util.Calendar;
import java.util.List;

public interface EXCService extends BPMTaskService<EXCUnusualTask> {

    //region 异常统计
    ServiceResult<List<EXCStatRate>> EXC_GetTypeRateList(BMSEmployee wLoginUser, int wUnusualType, int wDeviceID,
                                                         int wStationID, int wStatType,
                                                         Calendar wStartDate, Calendar wEndDate);

    ServiceResult<List<EXCStatRate>> EXC_GetStationRateList(BMSEmployee wLoginUser, int wUnusualType, int wDeviceID,
                                                            int wStationID, int wStatType,
                                                            Calendar wStartDate, Calendar wEndDate);

    ServiceResult<List<EXCStatRate>> EXC_GetDeviceRateList(BMSEmployee wLoginUser, int wUnusualType, int wDeviceID,
                                                           int wStationID, int wStatType,
                                                           Calendar wStartDate, Calendar wEndDate);

    ServiceResult<List<EXCStatRate>> EXC_GetTypeRateList(BMSEmployee wLoginUser, int wUnusualType, int wDeviceID,
                                                         int wStationID,
                                                         Calendar wStartDate, Calendar wEndDate);

    ServiceResult<List<EXCStatRate>> EXC_GetStationRateList(BMSEmployee wLoginUser, int wUnusualType, int wDeviceID,
                                                            int wStationID,
                                                            Calendar wStartDate, Calendar wEndDate);

    ServiceResult<List<EXCStatRate>> EXC_GetDeviceRateList(BMSEmployee wLoginUser, int wUnusualType, int wDeviceID,
                                                           int wStationID,
                                                           Calendar wStartDate, Calendar wEndDate);

    ServiceResult<Integer> EXC_AutoSendReportExc(BMSEmployee wLoginUser, int wResponsorID, int wStationID,
                                                 String wRemark);
    //endregion

    //region 停线停序
    ServiceResult<Integer> EXC_SubmitLineStop(BMSEmployee wLoginUser, EXCLineStop wEXCLineStop, int wStatus);

    ServiceResult<Boolean> EXC_IsRoutePartPointStop(BMSEmployee wLoginUser, int wOrderID, int wRoutePartPointID);

    //endregion

    //region 返工返修
    ServiceResult<Integer> EXC_SubmitProductRepair(BMSEmployee wLoginUser, EXCProductRepair wEXCProductRepair, int wStatus);

    ServiceResult<List<FPCRoutePartPoint>> EXC_QueryRepairPartPointList(BMSEmployee wLoginUser, String wWorkpieceNos);

    ServiceResult<List<SFCWorkpieceRecord>> EXC_QueryWorkpieceCodeList(BMSEmployee wLoginUser, int wOrderID);

    ServiceResult<Integer> EXC_ProductRepairItemStatusUpdateLogic(BMSEmployee wLoginUser, SFCTaskIPT wSFCTaskIPT,boolean wIsReport);
    //endregion
}
